1. Field of the Invention
The present invention relates to computer systems and computer implemented processes for transforming computer program code. More particularly, the invention relates to automated transformation technology for analyzing procedural assembler style goto based source code and producing object oriented source code operable on modern computer systems.
2. Background and Related Art
The operation of computer systems is controlled by program code. The program code can comprise operating system code that controls the overall operation of the computer and application code which accomplishes a particular result desired by the computer owner. Over time companies have developed a large number of computer code programs related to their business and operations. Unfortunately, computer systems and computer system programming technologies have continued to evolve at a rapid pace. Much of the code existing in companies was written for earlier technological platforms and is often unable to take advantage of modern computing devices.
The development of object oriented computer languages has been described as one of the most significant technological changes to occur in the software industry. Object oriented systems are characterized by having encapsulation and inheritance. Encapsulation refers to the collection of data and functions for acting on that data (known as methods) into a single object. Inheritance allows a new object to extend or refine existing objects without repeating the data or code in that preexisting object.
One emerging new computer environment is the network computing (NC) environment. The network computing environment envisions software programs being stored on centrally managed server computers with portions of the code downloaded to run, as required, on the client computer. The Java language (Java is a trademark of Sun Microsystems, Inc.) is an object oriented language that supports a network computing environment. The following description will focus on transforming existing programs to programs written in the Java language but there is no restriction on the application of this invention to generation of other object oriented languages such as C++ and SmallTalk.
Existing procedural software source code has often been written as assembler language macros. Assembler language is goto (or branch) oriented and does not support modern structured programming control flow constructs. The programmer uses a "goto label" instruction to cause transfer of control in a program to the indicated "label." This approach produces a "wandering stack" program because the entries on the program stack are not clearly structured. Each "goto" can cause a branch to an arbitrary location. The control flow is not controlled by the stack. Structured programming, in contrast, supports constructs such as if/then/else conditionals, while loops and block structure. Structured language programs have a more coherent stack. Wien a structured block of code is completed, control returns to an earlier point by "popping" an entry off the stack. This stack does not "wander." Fourth generation languages such as C, Fortran, and Cobol suffer from the same problems as assembler language with much of the code written to use gotos rather than structured programming control flow constructs.
The Java language and most object oriented languages control the flow of program logic without the use of goto, branch constructions. Java does not have a "goto" statement. Transformation of procedural source code containing gotos into a language such as Java has historically been difficult to do requiring significant manual effort to perform the transformation.
Conversion of legacy programs into Java or other object oriented form is essential for companies to take advantage of emerging technologies including network computer technologies. The lack of an ability to easily and reliably convert legacy programs into object oriented programs forces companies to continue to use old, often inefficient, processing techniques. An automated process for converting legacy applications into object oriented applications, and particularly into programs operable in evolving NC environments will increase company data processing efficiencies and allow improved productivity for those companies.
There exists a technical problem of being able to automatically translate procedural, goto based source code into object oriented source code such as Java. There is a further technical problem of transforming the procedural code into object oriented source code that is efficiently executable on a computer system.